package ae.pcfc.etks.online.itworx.ehs.web.common.exception;

import java.io.Serializable;

import ae.pcfc.etks.online.itworx.ehs.web.model.Rollback;

/**
 * the base exception interface which all exceptions will implement to get the
 * get the error details feature
 * 
 * @author Ahmed.Mostafa
 * 
 */
public interface BaseException extends Serializable {

	/**
	 * retrieve custom error code
	 * 
	 * @return
	 */
	String getErrorCode();

	/**
	 * set error code to be used by any system interested in a custom error code
	 * 
	 * @param errorCode
	 */
	void setErrorCode(String errorCode);

	/**
	 * set the error details for the exception
	 * 
	 * @param errorDetails
	 */
	void setErrorRollbackBean(Rollback rollback);

	/**
	 * 
	 * @return error details for the excetpion
	 */
	Rollback getErrorRollbackBean();

	/**
	 * override the toString
	 * 
	 * @return
	 */
	String toString();

}